{% extends "./common/wxing.html" %}

{% block mainContent %}
<div class="log">
    <div class="container-main normal drop-body">
        <div class="allMerchant">
            <p class="breadcrumb"><span>权限</span> <span class="divider">/</span> <span
                    class="active">admin</span></p>
            <div class="panel-content">
                <ul class="yui-tab-navigator cf">
                    <li><a href="/wxing/datebase" class="">table</a></li>
                    <li class="yui-this"><a href="/wxing/datebase/detail" class="">{{wxing_data.column.name}}</a></li>
                </ul>
                <div class="drop-body">
                    <div>
                        <div class="operation-wrap">
                            <a href="/master/permision/newRole" class="btn btn-primary btn-small">新建字段</a>
                        </div>
                        <table lay-skin="line" class="yui-table">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>名称</th>
                                <th width="150">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for item in wxing_data.column.list %}
                            <tr>
                                <td>{{loop.index}}</td>
                                <td>{{item.COLUMN_NAME}}</td>
                                <td>
                                    <a href="/wxing/{{tpl.html}}/{{item.table_name}}" class="btn btn-primary btn-mini layer-fields" data-tableName="{{item.table_name}}">编辑</a>
                            </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block mainjs %}
<script src="js/jquery.2.min.js"></script>
<script src="js/basis.js"></script>
<script>
    $(function () {
        $(".layer-fields").on("click",function () {
            console.log($(this).data("tablename"));
            layui.use('layer', function(){
                var layer = layui.layer;

                layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    shadeClose: true,
                    skin: 'yourclass',
                    content: '自定义HTML内容'
                });
            });

        })
    })
</script>
{% endblock %}